﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DTO;
using System.Data.OleDb;

namespace DAO
{
    public class PhanCongDAO
    {
        public static int Them(PhanCongDTO phanCongDto)
        {
            try
            {
                OleDbConnection cnn = BoKetNoiCSDL.KetNoi();
                string strFormat = string.Format("Insert into Phan_Cong(MaPhanCong, NgayPhanCong, MaNVPC) Values('{0}', '{1}', '{2}')", phanCongDto.MaPhanCong, phanCongDto.NgayPhanCong, phanCongDto.NhanVienPhanCong);
                OleDbCommand cmd = new OleDbCommand(strFormat, cnn);

                cnn.Open();
            }
            catch (System.Exception ex)
            {
                throw ex;
            }
            return 0;
            
        }

    }
}
